Performed [21405] and [21406], moving the contact list to Source, on adium-1.1
[adiumx.git] / Plugins / IRC Libpurple Plugin / ESIRCService.m
blob575faf07ea47069d78e7137ce8eaaab03d7a9dc7
1 //
2 //  ESIRCService.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 3/4/06.
6 //
8 #import "ESIRCService.h"
9 #import "ESIRCAccount.h"
10 #import "ESIRCAccountViewController.h"
11 #import "ESIRCJoinChatViewController.h"
12 #import <AIUtilities/AIImageAdditions.h>
14 @implementation ESIRCService
15 //Account Creation
16 - (Class)accountClass{
17         return [ESIRCAccount class];
20 - (AIAccountViewController *)accountViewController{
21     return [ESIRCAccountViewController accountViewController];
24 - (DCJoinChatViewController *)joinChatView{
25         return [ESIRCJoinChatViewController joinChatView];
28 //Service Description
29 - (NSString *)serviceCodeUniqueID{
30         return @"libpurple-IRC";
32 - (NSString *)serviceID{
33         return @"IRC";
35 - (NSString *)serviceClass{
36         return @"IRC";
38 - (NSString *)shortDescription{
39         return @"IRC";
41 - (NSString *)longDescription{
42         return @"IRC (Internet Relay Chat)";
44 - (NSCharacterSet *)allowedCharacters{
45         return [NSCharacterSet characterSetWithCharactersInString:@"+abcdefghijklmnopqrstuvwxyz0123456789@._- "];
47 - (NSCharacterSet *)ignoredCharacters{
48         return [NSCharacterSet characterSetWithCharactersInString:@""];
50 - (BOOL)caseSensitive{
51         return NO;
53 - (BOOL)canCreateGroupChats{
54         return YES;
56 //Passwords are optional - XXX right now this means we totally ignore the password field
57 - (BOOL)requiresPassword
59         return NO;
61 - (AIServiceImportance)serviceImportance{
62         return AIServiceSecondary;
64 /*!
65 * @brief Placeholder string for the UID field
66  */
67 - (NSString *)UIDPlaceholder
69         return AILocalizedString(@"username@irc.server.com","Sample name and server for new IRC accounts");
72 /*!
73 * @brief Default icon
74  *
75  * Service Icon packs should always include images for all the built-in Adium services.  This method allows external
76  * service plugins to specify an image which will be used when the service icon pack does not specify one.  It will
77  * also be useful if new services are added to Adium itself after a significant number of Service Icon packs exist
78  * which do not yet have an image for this service.  If the active Service Icon pack provides an image for this service,
79  * this method will not be called.
80  *
81  * The service should _not_ cache this icon internally; multiple calls should return unique NSImage objects.
82  *
83  * @param iconType The AIServiceIconType of the icon to return. This specifies the desired size of the icon.
84  * @return NSImage to use for this service by default
85  */
86 - (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType
88         NSImage *baseImage = [NSImage imageNamed:@"irc" forClass:[self class]];
90         if (iconType == AIServiceIconSmall) {
91                 baseImage = [baseImage imageByScalingToSize:NSMakeSize(16, 16)];
92         }
94         return baseImage;
97 @end